<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>22_CSS3-新增背景属性-background-clip-text</title>

        <style>
            div {
                width: 600px;
                height: 200px;
                text-align: center;
                line-height: 200px;
                font-size: 100px;
                font-weight: bold;
                background-image: url(./img/shanghai.jpg);
                background-position: center center;

                color: transparent;
                -webkit-background-clip: text;
            }
        </style>

    </head>
    <body>
        <div>
            你好,上海
        </div>
    </body>
</html>